<?php 
    //gcm($this); 
    
    
//echo $this->url(array('page' => $this->next)); die;    
    
    if ($this->pageCount > 1): ?>
<div class="bottom-main">
    <div class="text">Search Events:</div>
    <ul class="paging">
        <!-- Previous page link -->
        <li class="np">
        <?php if (isset($this->previous)): ?>
            <a href="<?php echo $this->url(array('page' => $this->previous)); ?>">&lt; Prev.</a>
        <?php else: ?>
            <a href="#">&lt; Prev</a>
        <?php endif; ?>
        </li>
        
        <?php  foreach ($this->pagesInRange as $page): ?>
            <?php if($page != $this->current): ?>
        <li>
                <a href="<?php echo $this->url(array('page' => $page)); ?>">
                    <?php echo $page; ?>
                </a>
        </li>    
            <?php else: ?>
        <li class="current">
            <span class="first">
                <span class="last">
                    <span class="middle">
                        Page <?php echo $page; ?> 
                    </span>
                </span>
            </span>    
        </li>      
            <?php endif; ?>
        <?php  endforeach; ?>
        <!-- Next page link -->
        <?php if (isset($this->next)): ?>
        <li class="np"> 
            <a href="<?php echo $this->url(array('page' => $this->next)); ?>">
            Next &gt;
          </a>
        </li>    
        <?php else: ?>
          <li class="np"> 
            <a href="javascript:;">
            Next &gt;
          </a>
        </li>    
        <?php endif; ?>
    </ul>
    <div class="cf"></div>
</div>
<?php endif; ?>